package dao.impl;

import java.sql.SQLException;
import java.util.List;

import com.ibatis.sqlmap.client.SqlMapClient;

import module.FavoriteEMPHouses;
import dao.ABSBasicDAO;
import domain.vo.queryObject;

/**
 * 
* @ClassName: FavoriteEMPHousesDAOImpl
* @Description: 员工房屋收藏DAO实现类
* @author chenchao
* @date 2013-10-31 上午05:36:03
*
 */
public class FavoriteEMPHousesDAOImpl  extends ABSBasicDAO<FavoriteEMPHouses>{

	/**
	 * 构造方法
	 * @param sqlMapClient
	 */
	public FavoriteEMPHousesDAOImpl(SqlMapClient sqlMapClient) {
		super(sqlMapClient);
	}
	
	/* (non-Javadoc)
	 * @see dao.ABSBasicDAO#getAll()
	 */
	@Override
	public List<FavoriteEMPHouses> getAll() throws SQLException {
		return sqlMapClient.queryForList("FavoriteEMPHouses.getAll");
	}

	/* (non-Javadoc)
	 * @see dao.ABSBasicDAO#getById(java.lang.String)
	 */
	@Override
	public FavoriteEMPHouses getById(String id) throws SQLException {
		return (FavoriteEMPHouses)sqlMapClient.queryForObject("FavoriteEMPHouses.getId", id);
	}

	/* (non-Javadoc)
	 * @see dao.ABSBasicDAO#getByPK()
	 */
	@Override
	public FavoriteEMPHouses getByPK() {
		// TODO Auto-generated method stub
		return super.getByPK();
	}

	/* (non-Javadoc)
	 * @see dao.ABSBasicDAO#insertT(java.lang.Object)
	 */
	@Override
	public void insertT(FavoriteEMPHouses t) throws SQLException {
		sqlMapClient.insert("FavoriteEMPHouses.insertFavoriteEMPHousesInfo", t);
	}
	
	
	/* (non-Javadoc)
	 * @see dao.ABSBasicDAO#deleteT(java.lang.Object)
	 */
	@Override
	public void deleteT(FavoriteEMPHouses t) throws SQLException {
		sqlMapClient.delete("FavoriteEMPHouses.deleteFavoriteEMPHousesInfo", t);
	}

	/* (non-Javadoc)
	 * @see dao.ABSBasicDAO#updateT(java.lang.Object)
	 */
	@Override
	public void updateT(FavoriteEMPHouses t) throws SQLException {
		// TODO Auto-generated method stub
		super.updateT(t);
	}

	/* (non-Javadoc)
	 * @see dao.ABSBasicDAO#countByQueryObject(domain.vo.queryObject)
	 */
	@Override
	public int countByQueryObject(queryObject queryObject) throws SQLException {
		return (Integer)sqlMapClient.queryForObject("FavoriteEMPHouses.countByQueryObject", queryObject);
	}
}
